<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/17/017
 * Time: 9:11
 */

namespace app\Lib\Ioc\Img;


use app\Lib\Model\Img\DelFile;
use app\Lib\Model\Img\UpdateImg;
use app\Lib\Model\User\User;

class Img
{
    /**
     * 上传图片
     * @return int|string
     * @throws \app\Lib\Exception\BlException
     */
    public function updateImg($data){

        $model = (new UpdateImg(new User($data['opUid']),$data['filePath'],$data['fileName']));
        return $model->run();
    }

    /**
     * 删除图片
     * @param $data
     * @return string
     * @throws \app\Lib\Exception\BlException
     */
    public function delFile($data){
        $model = new DelFile($data['fileId']);
        return $model->run();
    }

}